export const userinfo = ()=>{
    return JSON.parse(localStorage.getItem('login_data')||'{}')
}

export const dateFmt=(timeStrap,f="-")=>{
    const date = new Date(parseInt(timeStrap))
    const y = date.getFullYear();
    const m = date.getMonth()+1;
    const d = date.getDate();
    const h = date.getHours();
    const mm = date.getMinutes();
    const s = date.getSeconds();
    
    return `${y}${f}${m}${f}${d} ${h}:${mm}:${s}`
}